<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Cambio Password</title>
    </h:head>
    <h:body>
        <ui:composition template="../templateInt.xhtml">
            <ui:define name="content">
                <h:form>
                    <a4j:outputPanel id="cambioPassPanel" ajaxRendered="true">
                        <h:panelGrid columns="2">
                            <h:outputText id="nuevoPassOutputText" value="Nuevo Password"/>
                            <h:inputSecret id="nuevoPassInputText" value="#{cambioPasswordBean.nuevoPassword}"/>
                            <h:outputText id="confirmarPassOutputText" value="Confirmar Password"/>
                            <h:inputSecret id="confirmarPassInputText" value="#{cambioPasswordBean.confirmarPassword}"/>
                            <a4j:commandButton id="cambiarCommandButton" value="Cambiar" actionListener="#{cambioPasswordBean.cambiarPassword}"
                                               render="informacionPopup" oncomplete="#{rich:component('informacionPopup')}.show();return false"/>
                        </h:panelGrid>
                    </a4j:outputPanel>
                </h:form>
                <rich:popupPanel id="informacionPopup" width="250" height="150">
                    <f:facet name="header">Información</f:facet>
                    <h:panelGrid>
                        <h:panelGrid columns="2">
                            <h:outputText value="#{cambioPasswordBean.mensaje}" style="FONT-SIZE: small;" />
                        </h:panelGrid>
                        <h:panelGroup>
                            <input type="button" value="OK"
                                   onclick="#{rich:component('informacionPopup')}.hide();
                                           submit();
                                           return false;" />
                        </h:panelGroup>
                    </h:panelGrid>
                </rich:popupPanel>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

